package com.bdk.middle.orchestration.service;

import com.bdk.middle.common.result.ResultDO;
import com.bdk.middle.orchestration.api.domain.ServiceManagerDO;
import com.bdk.middle.orchestration.api.query.ServiceManagerQueryDO;
import com.bdk.middle.orchestration.core.entity.ServiceManagerEntity;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  微服务服务类
 * </p>
 *
 * @author Reagan
 * @since 2021-03-12
 */
public interface ServiceManagerService extends IService<ServiceManagerEntity> {

    /**
     * 添加服务
     * @param domain 用户DO
     * @return ResultDO
     */
    public ResultDO add(ServiceManagerDO domain);

    /**
     * 修改服务信息
     * @param domain 用户DO
     * @return ResultDO
     */
    public ResultDO edit(ServiceManagerDO domain);

    /**
     * 获取服务详情
     * @param id 用户ID
     * @return ResultDO
     */
    public ResultDO get(String id);

    /**
     * 删除服务
     * @param id 用户ID
     * @param modifier 修改人用户名
     * @return ResultDO
     */
    public ResultDO remove(String id, String modifier);

    /**
     * 查找服务列表分页
     * @param domain 查询DO
     * @return ResultDO
     */
    public ResultDO find(ServiceManagerQueryDO domain);

    /**
     * 改变服务上下加状态
     * @param id
     * @param status
     * @return ResultDO
     */
    public ResultDO updateStatus(String id, int status, String modifier);

    /**
     * 返回所以上架的服务
     * @return ResultDO
     */
    public ResultDO getAvailableService();
}
